Imports iConverter.Contracts
Imports iConverter.Extensions
Imports Microsoft.International.Converters.TraditionalChineseToSimplifiedConverter


''' <summary>
''' 把繁体中文转换为简体中文。  
''' </summary>
''' <remarks></remarks>
Public Class ToSimplifiedProcessor
    Inherits Processor(Of My.MySettings)

    Public Sub New()
        MyBase.New(New Guid("F6C38089-F099-48A4-AB20-66222CC9A3B9"),
                   "转换为简体中文",
                   "把繁体中文转换为简体中文",
                   My.Resources.SH_32x32, My.Resources.SH_16x16)
    End Sub

    Protected Overrides Sub OnProcessing(doc As iConverter.Contracts.IConvertDocument)
        Dim str = ChineseConverter.Convert(doc.Content, ChineseConversionDirection.TraditionalToSimplified)

        doc.Content = str
    End Sub
End Class
